package pro.cherish.knowledgedemovalid.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import pro.cherish.knowledgedemovalid.selfValid.OddValid;

import javax.validation.constraints.NotNull;

@Data
@ApiModel
public class UserEntity {

    @ApiModelProperty("id不能为空")
    @NotNull
    @OddValid
    private Integer id;

    @NotNull
    @Length(min = 2,max = 5)
    @ApiModelProperty("用户名不能空，且长度为2~5")
    private String username;

    @ApiModelProperty("ave参数")
    private Integer ave;
}
